<?php if ($pager->haveToPaginate()): ?>
<div class="pagination">
  <a href="<?php echo $route ?>/1" class="first">&lt;&lt;</a>

  <a href="<?php echo $route ?>/<?php echo $pager->getPreviousPage() ?>" class="prev">&lt;</a>

  <?php foreach ($pager->getLinks(40) as $page): ?>
    <?php if ($page == $pager->getPage()): ?>
      <a href="<?php echo $route ?>/<?php echo $page ?>" class="current"><?php echo $page ?></a>
    <?php else: ?>
      <a href="<?php echo $route ?>/<?php echo $page ?>"><?php echo $page ?></a>
    <?php endif; ?>
  <?php endforeach; ?>

  <a href="<?php echo $route ?>/<?php echo $pager->getNextPage() ?>" class="next">&gt;</a>

  <a href="<?php echo $route ?>/<?php echo $pager->getLastPage() ?>" class="last">&gt;&gt;</a>
</div>
<?php endif; ?>